source("script.txt")

files=c("sgraphLittlePrince/bu2false.txt","sgraphLittlePrince/bu2true.txt")

fullplot(files, y="nrRules", ylim=c(1,10^6))

%%%%%%%%%sgraph decomp

%%% TD vs BU
files=c("sgraphLittlePrince/bu3true.txt", "sgraphLittlePrince/td3true.txt")
legend=c("BU, s=3", "TD, s=3")
fullplot(files, legend, "sgraphLittlePrince/TDBURun.pdf",y="runtime_ms", ylab="runtime [s]", ylim=c(1,10^5))
files=c("sgraphLittlePrince/bu3true.txt", "sgraphLittlePrince/td3true.txt", "sgraphLittlePrince/reduced3true.txt")
legend=c("BU, s=3", "TD, s=3", "reduced, s=3")
fullplot(files, legend, "sgraphLittlePrince/TDBUSize.pdf",y="nrRules", ylab="rule count", ylim=c(1,10^7))
fullplot(files, legend, "sgraphLittlePrince/TDBUStates.pdf",y="nrStates", ylab="states explored", ylim=c(1,10^7))

%%% sources
files=c("sgraphLittlePrince/bu2true.txt", "sgraphLittlePrince/bu3true.txt", "sgraphLittlePrince/bu4true.txt")
legend=c("BU, s=2", "BU, s=3", "BU, s=4")
fullplot(files, legend, "sgraphLittlePrince/sourcesRun.pdf",y="runtime_ms", ylab="runtime [s]", ylim=c(1,10^7))
fullplot(files, legend, "sgraphLittlePrince/sourcesSize.pdf",y="nrRules", ylab="rule count", ylim=c(1,10^9))
fullplot(files, legend, "sgraphLittlePrince/sourcesCov.pdf",y="success", ylab="coverage", ylim=c(0,1), log=FALSE, legloc="bottomleft")

%%% connectivity 
files=c("sgraphLittlePrince/bu3true.txt", "sgraphLittlePrince/bu3false.txt", "sgraphLittlePrince/bu4true.txt", "sgraphLittlePrince/bu4false.txt")
legend=c("s=3", "s=3, only connected", "s=4", "s=4, only connected")
fullplot(files, legend, "sgraphLittlePrince/connRun.pdf",y="runtime_ms", ylab="runtime [ms]", ylim=c(1,10^7))
fullplot(files, legend, "sgraphLittlePrince/connSize.pdf",y="nrRules", ylab="rule count", ylim=c(10,10^9))

%%% blobs
files=c("sgraphLittlePrince/bu3false.txt", "sgraphLittlePrince/bu4false.txt", "sgraphLittlePrince/bu4falseBlob.txt", "sgraphLittlePrince/bu5falseBlob.txt")
legend=c("s=3", "s=4", "s=4, blobs", "s=5, blobs")
fullplot(files, legend, "sgraphLittlePrince/blobsRun.pdf",y="runtime_ms", ylab="runtime [ms]", ylim=c(1,10^6))
fullplot(files, legend, "sgraphLittlePrince/blobsSize.pdf",y="nrRules", ylab="rule count", ylim=c(1,10^8))
fullplot(files, legend, "sgraphLittlePrince/blobsCov.pdf",y="success", ylab="coverage", ylim=c(0.8,1), log=FALSE, legloc="bottomleft")




%%% language size 
files=c("sgraphLittlePrince/bu2falseLang.txt", "sgraphLittlePrince/bu3falseLang.txt", "sgraphLittlePrince/bu4falseLang.txt")
legend=c("s=2","s=3","s=4")
fullplot(files, legend, "sgraphLittlePrince/lang.pdf",y="languageSize", ylab="number of terms", ylim=c(1,10^9), xmax=c(6,3,2), legloc="topright")




%%%graph sizes
files=c("sgraphLittlePrince/bu2false.txt")
legend=c("Little Prince")
fullplot(files, legend, "sgraphLittlePrince/graphSizes.pdf",y="n", ylab="number of graphs", log=FALSE, aggFun=length, ylim=c(0,240))
files=c("LDC2015/sgraph2.txt")
legend=c("LDC2015E86")
fullplot(files, legend, "LDC2015/graphSizes.pdf",y="n", ylab="number of graphs", log=FALSE, aggFun=length, ylim=c(0,1200), large=TRUE)


%%% LDC sgraph
files=c("LDC2015/sgraph2.txt", "LDC2015/sgraph3.txt", "LDC2015/sgraph4.txt")
legend=c("s=2", "s=3", "s=4")
fullplot(files, legend, "LDC2015/sgraphRun.pdf",y="runtime_ms", ylab="runtime [s]", ylim=c(1,10^7), large=TRUE)
fullplot(files, legend, "LDC2015/sgraphSize.pdf",y="nrRules", ylab="rule count", ylim=c(1,10^9), large=TRUE)
fullplot(files, legend, "LDC2015/sgraphCov.pdf",y="success", ylab="coverage", ylim=c(0,1), log=FALSE, legloc="bottomleft", large=TRUE)

%%% AM
files=c("LDC2015/am.txt", "LDC2015/sgraph2.txt", "LDC2015/sgraph3.txt")
legend=c("AM", "HR, s=2", "HR, s=3")
fullplot(files, legend, "LDC2015/run.pdf",y="runtime_ms", ylab="runtime [s]", ylim=c(1,10^6), large=TRUE)
fullplot(files, legend, "LDC2015/size.pdf",y="nrRules", ylab="rule count", ylim=c(1,10^9), large=TRUE)
fullplot(files, legend, "LDC2015/cov.pdf",y="success", ylab="coverage", ylim=c(0,1), log=FALSE, legloc="bottomleft", large=TRUE)

%%% AM Lang
files=c("LDC2015/amLang.txt", "LDC2015/amLangBest.txt", "LDC2015/sgraph2Lang.txt", "LDC2015/sgraph3Lang.txt")
legend=c("AM", "AM, preferred sources", "HR, s=2", "HR, s=3")
fullplot(files, legend, "LDC2015/lang.pdf",y="languageSize", ylab="number of terms", ylim=c(1,10^9), xmax=c(-1,-1,6,3), legloc="topright", large=TRUE, pchs=c(1,4,2,3), cols=c("black", 36, 139, 30))

%%% AM Split
files=c("LDC2015/amSplit.txt", "LDC2015/sgraph2Split.txt", "LDC2015/sgraph3Split.txt")
legend=c("AM", "HR, s=2", "HR, s=3")
fullplot(files, legend, "LDC2015/runSplit.pdf",y="runtime_ms", ylab="runtime [s]", ylim=c(1,10^6), large=TRUE)
fullplot(files, legend, "LDC2015/sizeSplit.pdf",y="nrRules", ylab="rule count", ylim=c(1,10^9), large=TRUE)
fullplot(files, legend, "LDC2015/covSplit.pdf",y="success", ylab="coverage", ylim=c(0,1), log=FALSE, legloc="bottomleft", large=TRUE)